home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / tex / meta27 / mfpandor.lzh / panlowers.mf < prev    next >
Text File  |  1990-11-16  |  41KB  |  1,037 lines

  1. %*****************************************************************************
  2. %        Copyright (c) 1989 by N. N. Billawala
  3. %*****************************************************************************
  4.  
  5.  
  6. % lowers.mf  lowercase roman alphabet
  7.  
  8. % 26 characters
  9.  
  10.     
  11.  vardef a_halfbowl=                                    % letter a with half bowl
  12. iff OK "a":  "The letter a";   
  13.    beginchar("a",a_w*width#+b_mono#,xheight#,0);  
  14.    lft z9=(.1w,.9h)//;         
  15.    rt z11r=(w,r_arch*h)//;       multpos(11,13)(stem.lc,0); 
  16.    bot rt z13r=(w,0);         
  17.    onaline(11l,13l)(1l,1r,5,6,12l);  
  18.     y1r=y1l+max(1,minor_curve.lc)=.52h+.75minor_curve.lc;
  19.     y5=.35[major_curve.lc-ov_b.lc,y1l]; 
  20.     y6=max(arch_thickness.lc,y5-arch_tip.lc);
  21.    onaline(11r,13r)(12r);        
  22.     y12r=x_bracket_h; y12l=max(y12r,y1r);
  23.    top y10r=bot y10l+arch_thickness.lc=h+ov_t.lc;    
  24.    good_x_for(10r)(z9,z12l,min(.95,arch_reference+.1 if singlepitch:+.05 fi))a; 
  25.    good_x_for(10l)(z9,z10r,arch_inner_amt)b;
  26.    x10l:=max(x10l,x10r-arch_thickness.lc);
  27.    lft z3l=(0,.35[-ov_b.lc,y1r])//; 
  28.    rt z3r=(lft x3l+max(1,.9bowlstem.lc),max(.4[-ov_b.lc,y1r],major_curve.lc));  
  29.    y2=.75y1r;  good_x_for(2)(z3l,z1r,.4)c; 
  30.    ref1=terminalserif.r(z13,z11,z5,z12r,.5ts,base_terminal_angle)soft;
  31.    archtip:=arch_tip.lc; save arch_tip; 
  32.    arch_tip.lc=min(archtip,minor_bowl_tip.lc,y5-arch_thickness.lc);
  33.    ref2=arch.bl(z5,-ov_b.lc,z3r,z3l)lc; 
  34.    p1'=z3r{upward}...z1l{z1r-z2}--subpath(3,5)of ref2--cycle;
  35.    p1 =z1r{z2-z1r}...z3l{downward}--outer_juncture_path.br(ref2,ref1,2)--
  36.       z11r{upward} o_t bulb.tl(z9,z10l,z10r,.75cs,.5bulb_thickness,90) i_t
  37.       z12l{downward}..z1r & cycle;
  38.    showpoints(1,2,3,5,6,9,10,11,12,13);
  39.    adjust(v_f*fitbasis.lc#+m_cc*b_mfit#,v_b*fitbasis.lc#+m_c*b_mfit#); 
  40.    show_character; endchar;
  41.  enddef;
  42.  
  43.  
  44.  def a_fullbowl=                                  % the letter a with fullbowl
  45. iff OK "a":  "The letter a";   
  46.   beginchar(97+alt0+alt2,b_w*width#+c_mono#,xheight#,0);      
  47.   top rt z11r=(w,h)//;        multpos(11,13)(stem.lc,0); 
  48.   bot rt z13r=(w,0);          pos10(max(1,.3stem.lc),0-oblique);    % spur
  49.   onaline(11l,13l)(1l,2,5,6);   
  50.    y1l=(h+ov_t.lc-minor_curve.lc)-minor_ductal.lc;
  51.    y2=y1l+minor_bowl_tip.lc;
  52.    y5=ductal[major_curve.lc-ov_b.lc,y1l]; 
  53.    y6=y5-minor_bowl_tip.lc;
  54.   onaline(11r,13r)(1r,10r,12r); 
  55.    top y10=h; y12r=x_bracket_h; y1r=y1l-.5stem.lc;
  56.   lft z3l=(0,(1-v_stress)*h-.0*bowlstem.lc)//;
  57.   rt x3r=lft x3l+bowlstem.lc;
  58.   y3r=inlimit((1-v_stress)*h+.0*bowlstem.lc)(major_curve.lc,h-minor_curve.lc);
  59.   ref1=bowl.l(z5,-ov_b.lc,z1l,h+ov_t.lc,z3r,z3l);
  60.   ref3=(z1r soften(z10r,z10l) z2);
  61.   ref4=terminalserif.r(z13,z11,z5,z12r,.5ts,base_terminal_angle)soft;
  62.   if spur:ref2=outer_bowlpath(ref1);                            % bowl and spur
  63.           p1=outer_juncture_path.br(ref2,ref4,5)--ref3--cycle; 
  64.      else:ref0=bowl.l(z5,-ov_b.lc,z1r,h+ov_t.lc,z3r,z3l);     % bowl
  65.           ref2=outer_bowlpath(ref0);  
  66.           p1=outer_juncture_path.br(ref2,ref4,5)--cycle;   fi    
  67.   p1'=bowl_counter(ref1)--cycle;                                % counter
  68.   showpoints(1,2,3,5,6,10,11,12,13);  
  69.   adjust(v_c*fitbasis.lc#+m_cc*c_mfit#,v_a*fitbasis.lc#+m_c*c_mfit#); 
  70.   show_character; endchar;
  71.  enddef;
  72.  
  73.  def letter_a= save a,b,c;
  74.   vardef a=condition(spur)t; testing_codes; a_fullbowl; enddef; 
  75.   vardef b=condition(spur)f; testing_codes;a_fullbowl; enddef;
  76.   vardef c=a_halfbowl; enddef;
  77.   if test_all_characters:a;b;c;else:if a_full_bowl:if spur:a;else:b;fi else:c;fi
  78.     fi
  79.  enddef;
  80.  
  81.  letter_a;  save letter_a,a_fullbowl,a_halfbowl;
  82.  
  83.  
  84.  
  85.  def character_points=
  86. iff OK "b":  "The letter b"; 
  87.   beginchar(98+alt2,b_w*width#+c_mono#,ascender#,0);
  88.   top lft z11l=(0,h)//;          multpos(11,14)(stem.lc,0); 
  89.   bot lft z14l=(0,0);
  90.   z15l=z14l;                     pos15(max(1,.3stem.lc),0);
  91.   onaline(11r,14r)(1r,2,5,6,12r);  
  92.    y1l=y1r=(minor_curve.lc-ov_b.lc)+minor_ductal.lc;
  93.    y2=y1r-minor_bowl_tip.lc;
  94.    y5=ductal[xheight+ov_t.lc-major_curve.lc,y1r]; 
  95.    y6=xheight+ov_t.lc;
  96.    y12r=max(y6,h-x_bracket_h);
  97.   onaline(11l,14l)(1l,12l,13l);  
  98.    y13l=x_bracket_h; 
  99.    y12l=max(h-x_bracket_h,y13l);
  100.   rt z3r=(w,v_stress*xheight+.0*bowlstem.lc)//;
  101.   lft x3l=rt x3r-bowlstem.lc;
  102.   y3l=inlimit(v_stress*xheight-.0*bowlstem.lc)
  103.              (minor_curve.lc,xheight-minor_curve.lc);
  104.  
  105.   ref1=bowl.r(z5,xheight+ov_t.lc,z1r,-ov_b.lc,z3l,z3r);
  106.   ref3=(z1l soften(z15l,z15r) z2); 
  107.   ref4=terminalserif.l(z11,z14,z12l,z12r,.5ts,asc_terminal_angle);
  108.   p1'=bowl_counter(ref1)--cycle;                                    % counter  
  109.   if spur:p1=outer_bowlpath(ref1)--ref4--ref3--cycle;            % bowl and spur
  110.      else:ref0=bowl.r(z5,xheight+ov_t.lc,z1l,-ov_b.lc,z3l,z3r);     % bowl
  111.           p1 =outer_bowlpath(ref0)--ref4--cycle;     fi
  112.   showpoints(1,2,3,5,6,11,12,13,14,15,20,21);
  113.   adjust(v_a*fitbasis.lc#+m_c*c_mfit#,v_c*fitbasis.lc#+m_cc*c_mfit#); 
  114.   show_character; endchar;
  115.  enddef;
  116.  
  117.  vardef letter_b= save a,b;
  118.   vardef a=condition(spur)t; testing_codes;character_points; enddef;  % spur
  119.   vardef b=condition(spur)f; testing_codes;character_points; enddef;  % no spur
  120.   if test_all_characters:a;b; else:if spur:a; else:b; fi fi
  121.  enddef;
  122.  
  123.  letter_b;  save letter_b;
  124.  
  125.  
  126.  
  127. iff OK "c":  "The letter c"; 
  128.   beginchar("c",c_w*width#+b_mono#,xheight#,0);
  129.  
  130.   save_num(term_length)=if bulb_taper:c_and_s.lc else:.75cs fi;
  131.   min_limit(join_radius)(.5minor_curve.lc); 
  132.   rt z1=(.95w,.9h)//;
  133.   lft z3l=(0,.5h)//;
  134.   rt z3r=(lft x3l+bowlstem.lc,.5h);
  135.   rt z5l=(w,major_curve.lc-ov_t.lc+.02h)//;          
  136.   top y2l=bot y2r+minor_curve.lc=h+ov_t.lc; 
  137.   bot y4l=top y4r-major_curve.lc=-ov_t.lc; 
  138.   good_x_for(2l)(z3l,z1,.6)a;  good_x_for(2r)(z3r,z1-(bulb_thickness,0),.6)b; 
  139.   good_x_for(4l)(z3l,z5l,.5)c; 
  140.   ref1=z4l{right}...z5l;
  141.   pos5(max(1,.7major_curve.lc),angle(direction 1 of ref1)+90);
  142.   good_x_for(4r)(z3r,z5r,.5)d; 
  143.  
  144.   x4r:=min(x4r,x4l+minor_curve.lc);
  145.  
  146.   p1=(bulb.tr(z1,z2r,z2l,term_length,bulb_thickness,90) o_t
  147.       z3l{downward} o_t z4l{right} o_t z5l 
  148.         if softpath:)softjoin(z5l--z5r)softjoin(else:--fi 
  149.       z5r i_t z4r{left} i_t z3r{upward} i_t z2r{right})--cycle;
  150.  
  151.   showpoints(1,2,3,4,5);
  152. adjust(v_c*fitbasis.lc#+m_e*b_mfit#,v_h*fitbasis.lc#+m_ee*b_mfit#); 
  153. show_character; endchar;
  154.  
  155.  
  156.  
  157. iff OK "d":  "The letter d"; 
  158.   beginchar("d",b_w*width#+c_mono#,ascender#,0);
  159.  
  160.   top rt z11r=(w,h)//;           multpos(11,14)(stem.lc,0); 
  161.   bot rt z14r=(w,0);
  162.   z15r=(1.05w,0);                pos15(max(1,.8stem.lc),0);
  163.   onaline(11l,14l)(1l,2,5,6,12l);
  164.    y1l=(xheight+ov_t.lc-minor_curve.lc)-minor_ductal.lc;
  165.    y2=y1l+minor_bowl_tip.lc;
  166.    y5=ductal[major_curve.lc-ov_b.lc,y1l]; 
  167.    y6=y5-minor_bowl_tip.lc;
  168.   onaline(11r,14r)(12r,13r);     
  169.    y13r=x_bracket_h; 
  170.    y12r=max(h-x_bracket_h,y13r);  y12l=max(y12r,y1l); 
  171.   lft z3l=(0,(1-v_stress)*xheight-.0*bowlstem.lc)//;
  172.   rt x3r=lft x3l+bowlstem.lc;
  173.   y3r=inlimit((1-v_stress)*xheight+.0*bowlstem.lc)
  174.               (major_curve.lc,xheight-minor_curve.lc);
  175.  
  176.   ref1=bowl.l(z5,-ov_b.lc,z1l,xheight+ov_t.lc,z3r,z3l);
  177.   ref2=outer_bowlpath(ref1);
  178.   ref3=terminalserif.r(z14,z11,z5,z13r,.5ts,base_terminal_angle)soft;
  179.  
  180.   p1'=bowl_counter(ref1)--cycle;                                 % counter
  181.   p1 =terminalserif.l(z11,z14,z12l,z12r,.5ts,asc_terminal_angle) % stem
  182.       --outer_juncture_path.br(ref2,ref3,5)--cycle;              % bowl
  183.  
  184.   showpoints(1,2,3,5,6,11,12,13,14,15);  
  185. adjust(v_c*fitbasis.lc#+m_cc*c_mfit#,v_a*fitbasis.lc#+m_c*c_mfit#); 
  186. show_character; endchar;
  187.  
  188.  
  189. iff OK "e":  "The letter e"; 
  190.   beginchar("e",b_w*width#+d_mono#,xheight#,0);
  191.  
  192.   min_limit(join_radius)(.5minor_curve.lc); 
  193.   bot rt z1r=(.95w,round(.6h-.65*.8thin_stem.lc))//; 
  194.   pos1(if narrow_condition:w_narrow_amt[thin_stem.lc,stem.lc] 
  195.         else:max(1,.85stem.lc) fi,ebar_angle);
  196.   lft z3l=(0,(1-v_stress)*h)//;
  197.   rt z3r=(lft x3l+bowlstem.lc,y3l);
  198.   rt z5l=(w,.15h)//;             pos5(minor_curve.lc,130-oblique); 
  199.   top y2l=bot y2r+major_curve.lc=h+ov_t.lc;    
  200.   bot y4l=top y4r-minor_curve.lc=-ov_t.lc;   
  201.   good_x_for(2l)(z3l,z1r,.51)a;   good_x_for(2r)(z3r,z1l,.49)b; 
  202.   good_x_for(4l)(z3l,z5l,.5)c;   good_x_for(4r)(z3r,z5r,.5)d;
  203.   x4r:=min(x4r,x4l+minor_curve.lc); 
  204.   onaline(1l,1r)(40); x40=x41=0;
  205.   z42=z1r+(